Skip to content

Conversation

delneg
Copy link
Contributor

@delneg delneg commented Oct 29, 2021

Some functions from "string", although I'm struggling with 'Template' and 'Formatter' classes. (https://github.com/python/typeshed/blob/master/stdlib/string.pyi#L22)
How should they be bind ? Is there any example .. ?
Maybe it's using [] or some other way

@dbrattli
Copy link
Collaborator

For string format I was planning to do this:

type System.String with
    [<Emit("$0.format($1...)")>]
    member self.format([<ParamArray>] args: Object[]) = nativeOnly

Is it something similar you need to do for the Formatter class? I've btw added a TestString.fs file, so you can add more unit-tests there for string handling.

@dbrattli
Copy link
Collaborator

Some features like named arguments for format is currently blocked by #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants